home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / port-handler.doc < prev    next >
Encoding:
Text File  |  1999-10-22  |  4.4 KB  |  126 lines

  1. TABLE OF CONTENTS
  2.  
  3. port-handler/port_handler
  4. port-handler/port_handler                           port-handler/port_handler
  5.  
  6.    NAME
  7.     port_handler -- standard serial/parallel/printer port handler.
  8.  
  9.    SYNOPSIS
  10.     Open("PRT:[RAW/TRANSPARENT/UNIT=<Unit number>]",...);
  11.  
  12.     Open("SER:[BAUD=<speed>/CONTROL=<settings>/UNIT=<Unit number>]",...);
  13.  
  14.     Open("PAR:[UNIT=<Unit number>]",...);
  15.  
  16.    FUNCTION
  17.     Port-handler allows AmigaDOS to interface to a standard parallel
  18.     device, a standard printer device, and a standard serial device.
  19.  
  20.     Accessing "PAR:" connects AmigaDOS to the system's parallel port.
  21.     By default this will use parallel.device, unit 0. To use a
  22.     different unit number, such as 1, specify "PAR:UNIT=1" instead.
  23.  
  24.     Accessing "PRT:" connects AmigaDOS to the system's printer. Data
  25.     written to PRT: is processed by the Amiga's printer device, handling
  26.     conversions of ANSI sequences, and sent to the printer. Accessing
  27.     "PRT:RAW" instead causes carriage return translation to be turned
  28.     off in the printer device while printing. To send data transparently
  29.     to the printer, without any translation or escape sequence substitution
  30.     whatsoever, use "PRT:TRANSPARENT". The TRANSPARENT and RAW switches
  31.     are mutually exclusive. By default "PRT:" will access printer.device,
  32.     unit 0. To use a different unit number, such as 1, specify "PRT:UNIT=1"
  33.     instead. The keywords can be combined, such as in "PRT:RAW/UNIT=1".
  34.  
  35.     Accessing "SER:" connects AmigaDOS to the system's default serial port.
  36.     Following SER:, the baud rate and some control information can be
  37.     supplied. This is done in the form "SER:baud/control" where baud is
  38.     a number indicating the baud rate, and where control is a 3 letter
  39.     sequence denoting the number of read/write bits, the parity, and the
  40.     number of stop bits. For example, "SER:9600/8N1" connects to the
  41.     serial port, sets the baud rate to 9600, with 8 bit data, no parity,
  42.     and 1 stop bit. The possible control settings are:
  43.  
  44.             1st character: 7 or 8
  45.             2nd character: N (No parity), O (Odd parity), E (Even parity)
  46.                            M (Mark parity), S (Space parity)
  47.             3rd character: 1 or 2
  48.  
  49.     Specifying no baud rate or control values when accessing SER: gives you
  50.     the values set in Serial preferences.
  51.     To override the default unit number, use the UNIT keyword, as with the
  52.     PRT: and PAR: devices described above. For example, to access unit 1
  53.     with 38400 bps you could use "SER:38400/UNIT=1".
  54.  
  55.    PACKETS
  56.     ACTION_FINDINPUT
  57.     ACTION_FINDOUTPUT
  58.     ACTION_FINDUPDATE
  59.     ACTION_READ
  60.     ACTION_WRITE
  61.     ACTION_END
  62.     ACTION_IS_FILESYSTEM
  63.  
  64.    MOUNTLIST ENTRIES
  65.     dos.library automatically mounts PAR:, PRT:, and SER: upon
  66.     system boot up. The mount entries used by dos.library are equivalent
  67.     to:
  68.  
  69.        SER:    Handler   = L:Port-Handler
  70.                Priority  = 5
  71.                StackSize = 800
  72.                GlobVec   = 1
  73.                Startup   = 0
  74.        #
  75.  
  76.        PAR:    Handler   = L:Port-Handler
  77.                Priority  = 5
  78.                StackSize = 800
  79.                GlobVec   = 1
  80.                Startup   = 1
  81.        #
  82.  
  83.        PRT:    Handler   = L:Port-Handler
  84.                Priority  = 5
  85.                StackSize = 1000
  86.                GlobVec   = 1
  87.                Startup   = 2
  88.        #
  89.  
  90.     Starting with V40, you can also provide disk-based mount entries
  91.     which let you use port-handler as a serial handler on various devices
  92.     and units. The form of these mount entries is:
  93.  
  94.        SER0:   EHandler  = L:Port-Handler
  95.                Priority  = 5
  96.                StackSize = 800
  97.                GlobVec   = 1
  98.                Device    = serial.device
  99.                Unit      = 0
  100.                Flags     = 0
  101.                Control   = "8N1"
  102.                Baud      = 9600
  103.     #
  104.  
  105.     The "Device", "Unit" and "Flags" keywords define the parameters
  106.     that the handler uses for OpenDevice(). "Baud" and "Control"
  107.     define the default values for baud rate and control information for
  108.     whenever that serial handler is accessed by name only, without
  109.     explicit baud rate and control information specified.
  110.  
  111.    NOTE
  112.     Prior to V40, the baud rate and control information for SER: were
  113.     only recognized if an A2232 multi-serial card was installed in the
  114.     system. Starting with V40, these values are always recognized.
  115.  
  116.     The TRANSPARENT, UNIT, BAUD and CONTROL keywords were introduced
  117.     with Port-Handler V44. For the different devices, the argument
  118.     templates are:
  119.  
  120.         PRT:RAW/S,TRANSPARENT/S,UNIT/K/N
  121.         SER:BAUD/N,UNIT/K/N,CONTROL/F
  122.         PAR:UNIT/K/N
  123.  
  124.     Instead of blank spaces, keywords must be separated by slashes ("/").
  125.  
  126.